<html xmlns="http://www.w3.org/1999/xhtml"
	xmlns:c="http://java.sun.com/jstl/core"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:t="http://myfaces.apache.org/tomahawk"
	xmlns:v="http://corejsf.com/validator">

<f:view>
	<f:loadBundle var="text" basename="#{userList.bundleName}" />
	<head>
	<title>#{text['menu.product.category.title']}</title>
	<meta name="heading" content="#{text['menu.product.category.title']}" />
	<meta name="menu" content="AdminMenu" />
	</head>
	<body id="createNewProduct">
		<h:form id="addNewProduct" enctype="multipart/form-data">
			<h:panelGrid>
				
					<h:outputLabel for="productCategoryName" value="#{text['menu.product.category.name']}"/>
					<t:message for="productCategoryName" errorStyle="color:red"/>
					<h:inputText requiredMessage="'Category name' is required field" value="#{productCategoryForm.productCategory.name}" id="productCategoryName" required="true" styleClass="text large">
						<v:commonsValidator type="required"></v:commonsValidator>
					</h:inputText>
					
					<h:outputLabel styleClass="desc" for="file" value="#{text['menu.product.category.file.path']}"/>
    				<t:message for="file" styleClass="fieldError"/>
    				<t:inputFileUpload id="file" value="#{productCategoryForm.file}" storage="file" required="false" styleClass="file medium"/>   				
    				        				
				
				<h:panelGroup styleClass="buttonBar bottom">
        			<h:commandButton value="#{text['button.add']}" action="#{productCategoryForm.addNewProduct}" id="saveProductCategory" styleClass="button"/>
    			</h:panelGroup>
			</h:panelGrid>			
		</h:form>	
	</body>
</f:view>
</html>
